package org.aristotle.generator.controller;

import io.swagger.annotations.Api;
import org.aristotle.common.response.ResponseEntity;
import org.aristotle.common.response.result.Result;
import org.aristotle.generator.model.vo.ProjectVO;
import org.aristotle.generator.service.IGeneratorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("generator")
@Api(value="代码生成controller",tags={"代码生成操作接口"})
public class GeneratorController {

    @Autowired
    private IGeneratorService generatorService;

    @PostMapping
    public Result<?> generatorByProject(@RequestBody ProjectVO projectVO) {
        generatorService.generator(projectVO);
        return ResponseEntity.ok("成功");
    }



}
